Optimal. Leaf size=227 \[ -\frac {b d}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}+\frac {b d^2 (d e+f-c f) (d e-(1+c) f) \text {ArcTan}(c+d x)}{2 f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}-\frac {a+b \text {ArcTan}(c+d x)}{2 f (e+f x)^2}+\frac {b d^2 (d e-c f) \log (e+f x)}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}-\frac {b d^2 (d e-c f) \log \left (1+c^2+2 c d x+d^2 x^2\right )}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 227, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {5153, 2007,
723, 814, 648, 632, 210, 642} \begin {gather*} -\frac {a+b \text {ArcTan}(c+d x)}{2 f (e+f x)^2}+\frac {b d^2 \text {ArcTan}(c+d x) (-c f+d e+f) (d e-(c+1) f)}{2 f \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )^2}-\frac {b d^2 (d e-c f) \log \left (c^2+2 c d x+d^2 x^2+1\right )}{2 \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )^2}-\frac {b d}{2 (e+f x) \left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )}+\frac {b d^2 (d e-c f) \log (e+f x)}{\left (\left (c^2+1\right ) f^2-2 c d e f+d^2 e^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 723
Rule 814
Rule 2007
Rule 5153
Rubi steps
\begin {align*} \int \frac {a+b \tan ^{-1}(c+d x)}{(e+f x)^3} \, dx &=-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {(b d) \int \frac {1}{(e+f x)^2 \left (1+(c+d x)^2\right )} \, dx}{2 f}\\ &=-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {(b d) \int \frac {1}{(e+f x)^2 \left (1+c^2+2 c d x+d^2 x^2\right )} \, dx}{2 f}\\ &=-\frac {b d}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {(b d) \int \frac {d (d e-2 c f)-d^2 f x}{(e+f x) \left (1+c^2+2 c d x+d^2 x^2\right )} \, dx}{2 f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}\\ &=-\frac {b d}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {(b d) \int \left (\frac {2 d f^2 (d e-c f)}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}+\frac {d^2 \left (d^2 e^2-4 c d e f-\left (1-3 c^2\right ) f^2-2 d f (d e-c f) x\right )}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) \left (1+c^2+2 c d x+d^2 x^2\right )}\right ) \, dx}{2 f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )}\\ &=-\frac {b d}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {b d^2 (d e-c f) \log (e+f x)}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}+\frac {\left (b d^3\right ) \int \frac {d^2 e^2-4 c d e f-\left (1-3 c^2\right ) f^2-2 d f (d e-c f) x}{1+c^2+2 c d x+d^2 x^2} \, dx}{2 f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}\\ &=-\frac {b d}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {b d^2 (d e-c f) \log (e+f x)}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}-\frac {\left (b d^2 (d e-c f)\right ) \int \frac {2 c d+2 d^2 x}{1+c^2+2 c d x+d^2 x^2} \, dx}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}+\frac {\left (b d \left (4 c d^2 f (d e-c f)+2 d^2 \left (d^2 e^2-4 c d e f-\left (1-3 c^2\right ) f^2\right )\right )\right ) \int \frac {1}{1+c^2+2 c d x+d^2 x^2} \, dx}{4 f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}\\ &=-\frac {b d}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {b d^2 (d e-c f) \log (e+f x)}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}-\frac {b d^2 (d e-c f) \log \left (1+c^2+2 c d x+d^2 x^2\right )}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}-\frac {\left (b d \left (4 c d^2 f (d e-c f)+2 d^2 \left (d^2 e^2-4 c d e f-\left (1-3 c^2\right ) f^2\right )\right )\right ) \text {Subst}\left (\int \frac {1}{-4 d^2-x^2} \, dx,x,2 c d+2 d^2 x\right )}{2 f \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}\\ &=-\frac {b d}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}+\frac {b d^2 (d e-f-c f) (d e+f-c f) \tan ^{-1}(c+d x)}{2 f \left (d^2 e^2-2 c d e f+f^2+c^2 f^2\right )^2}-\frac {a+b \tan ^{-1}(c+d x)}{2 f (e+f x)^2}+\frac {b d^2 (d e-c f) \log (e+f x)}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}-\frac {b d^2 (d e-c f) \log \left (1+c^2+2 c d x+d^2 x^2\right )}{2 \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.64, size = 175, normalized size = 0.77 \begin {gather*} \frac {-\frac {a+b \text {ArcTan}(c+d x)}{(e+f x)^2}+\frac {1}{2} b d^2 \left (-\frac {2 f}{d \left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right ) (e+f x)}-\frac {i \log (i-c-d x)}{(d e-(-i+c) f)^2}+\frac {i \log (i+c+d x)}{(d e-(i+c) f)^2}-\frac {4 f (-d e+c f) \log (d (e+f x))}{\left (d^2 e^2-2 c d e f+\left (1+c^2\right ) f^2\right )^2}\right )}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(467\) vs.
\(2(222)=444\).
time = 0.33, size = 468, normalized size = 2.06
method | result | size |
derivativedivides | \(\frac {-\frac {a \,d^{3}}{2 \left (c f -d e -f \left (d x +c \right )\right )^{2} f}-\frac {b \,d^{3} \arctan \left (d x +c \right )}{2 \left (c f -d e -f \left (d x +c \right )\right )^{2} f}+\frac {b \,d^{3} f \arctan \left (d x +c \right ) c^{2}}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}-\frac {b \,d^{4} \arctan \left (d x +c \right ) c e}{\left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{5} \arctan \left (d x +c \right ) e^{2}}{2 f \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{3} f \ln \left (1+\left (d x +c \right )^{2}\right ) c}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}-\frac {b \,d^{4} \ln \left (1+\left (d x +c \right )^{2}\right ) e}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}-\frac {b \,d^{3} f \arctan \left (d x +c \right )}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{3}}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right ) \left (c f -d e -f \left (d x +c \right )\right )}-\frac {b \,d^{3} f \ln \left (c f -d e -f \left (d x +c \right )\right ) c}{\left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{4} \ln \left (c f -d e -f \left (d x +c \right )\right ) e}{\left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}}{d}\) | \(468\) |
default | \(\frac {-\frac {a \,d^{3}}{2 \left (c f -d e -f \left (d x +c \right )\right )^{2} f}-\frac {b \,d^{3} \arctan \left (d x +c \right )}{2 \left (c f -d e -f \left (d x +c \right )\right )^{2} f}+\frac {b \,d^{3} f \arctan \left (d x +c \right ) c^{2}}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}-\frac {b \,d^{4} \arctan \left (d x +c \right ) c e}{\left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{5} \arctan \left (d x +c \right ) e^{2}}{2 f \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{3} f \ln \left (1+\left (d x +c \right )^{2}\right ) c}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}-\frac {b \,d^{4} \ln \left (1+\left (d x +c \right )^{2}\right ) e}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}-\frac {b \,d^{3} f \arctan \left (d x +c \right )}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{3}}{2 \left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right ) \left (c f -d e -f \left (d x +c \right )\right )}-\frac {b \,d^{3} f \ln \left (c f -d e -f \left (d x +c \right )\right ) c}{\left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}+\frac {b \,d^{4} \ln \left (c f -d e -f \left (d x +c \right )\right ) e}{\left (c^{2} f^{2}-2 c d e f +d^{2} e^{2}+f^{2}\right )^{2}}}{d}\) | \(468\) |
risch | \(\text {Expression too large to display}\) | \(13218\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 436, normalized size = 1.92 \begin {gather*} -\frac {1}{2} \, {\left (d {\left (\frac {{\left (c d f - d^{2} e\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{4 \, c d^{3} f e^{3} - 2 \, {\left (3 \, c^{2} e^{2} + e^{2}\right )} d^{2} f^{2} + 4 \, {\left (c^{3} e + c e\right )} d f^{3} - {\left (c^{4} + 2 \, c^{2} + 1\right )} f^{4} - d^{4} e^{4}} - \frac {2 \, {\left (c d f - d^{2} e\right )} \log \left (f x + e\right )}{4 \, c d^{3} f e^{3} - 2 \, {\left (3 \, c^{2} e^{2} + e^{2}\right )} d^{2} f^{2} + 4 \, {\left (c^{3} e + c e\right )} d f^{3} - {\left (c^{4} + 2 \, c^{2} + 1\right )} f^{4} - d^{4} e^{4}} - \frac {{\left (2 \, c d^{3} f e - {\left (c^{2} - 1\right )} d^{2} f^{2} - d^{4} e^{2}\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{{\left (4 \, c d^{3} f^{2} e^{3} - 2 \, {\left (3 \, c^{2} e^{2} + e^{2}\right )} d^{2} f^{3} + 4 \, {\left (c^{3} e + c e\right )} d f^{4} - {\left (c^{4} + 2 \, c^{2} + 1\right )} f^{5} - d^{4} f e^{4}\right )} d} - \frac {1}{2 \, c d f e^{2} - {\left (c^{2} e + e\right )} f^{2} - d^{2} e^{3} + {\left (2 \, c d f^{2} e - {\left (c^{2} + 1\right )} f^{3} - d^{2} f e^{2}\right )} x}\right )} + \frac {\arctan \left (d x + c\right )}{f^{3} x^{2} + 2 \, f^{2} x e + f e^{2}}\right )} b - \frac {a}{2 \, {\left (f^{3} x^{2} + 2 \, f^{2} x e + f e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 679 vs.
\(2 (237) = 474\).
time = 6.84, size = 679, normalized size = 2.99 \begin {gather*} -\frac {{\left (b c^{2} + b\right )} d f^{4} x + a d^{4} e^{4} - {\left (4 \, a c - b\right )} d^{3} f e^{3} + {\left (a c^{4} + 2 \, a c^{2} + a\right )} f^{4} - {\left ({\left (b c^{2} - b\right )} d^{2} f^{4} x^{2} - {\left (b c^{4} + 2 \, b c^{2} + b\right )} f^{4} + 2 \, {\left (b d^{4} f x + b c d^{3} f\right )} e^{3} + {\left (b d^{4} f^{2} x^{2} - 4 \, b c d^{3} f^{2} x - {\left (5 \, b c^{2} + 3 \, b\right )} d^{2} f^{2}\right )} e^{2} - 2 \, {\left (b c d^{3} f^{3} x^{2} - {\left (b c^{2} - b\right )} d^{2} f^{3} x - 2 \, {\left (b c^{3} + b c\right )} d f^{3}\right )} e\right )} \arctan \left (d x + c\right ) + {\left (b d^{3} f^{2} x + 2 \, {\left (3 \, a c^{2} - b c + a\right )} d^{2} f^{2}\right )} e^{2} - {\left (2 \, b c d^{2} f^{3} x + {\left (4 \, a c^{3} - b c^{2} + 4 \, a c - b\right )} d f^{3}\right )} e - {\left (b c d^{2} f^{4} x^{2} - b d^{3} f e^{3} - {\left (2 \, b d^{3} f^{2} x - b c d^{2} f^{2}\right )} e^{2} - {\left (b d^{3} f^{3} x^{2} - 2 \, b c d^{2} f^{3} x\right )} e\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) + 2 \, {\left (b c d^{2} f^{4} x^{2} - b d^{3} f e^{3} - {\left (2 \, b d^{3} f^{2} x - b c d^{2} f^{2}\right )} e^{2} - {\left (b d^{3} f^{3} x^{2} - 2 \, b c d^{2} f^{3} x\right )} e\right )} \log \left (f x + e\right )}{2 \, {\left ({\left (c^{4} + 2 \, c^{2} + 1\right )} f^{7} x^{2} + d^{4} f e^{6} + 2 \, {\left (d^{4} f^{2} x - 2 \, c d^{3} f^{2}\right )} e^{5} + {\left (d^{4} f^{3} x^{2} - 8 \, c d^{3} f^{3} x + 2 \, {\left (3 \, c^{2} + 1\right )} d^{2} f^{3}\right )} e^{4} - 4 \, {\left (c d^{3} f^{4} x^{2} - {\left (3 \, c^{2} + 1\right )} d^{2} f^{4} x + {\left (c^{3} + c\right )} d f^{4}\right )} e^{3} + {\left (2 \, {\left (3 \, c^{2} + 1\right )} d^{2} f^{5} x^{2} - 8 \, {\left (c^{3} + c\right )} d f^{5} x + {\left (c^{4} + 2 \, c^{2} + 1\right )} f^{5}\right )} e^{2} - 2 \, {\left (2 \, {\left (c^{3} + c\right )} d f^{6} x^{2} - {\left (c^{4} + 2 \, c^{2} + 1\right )} f^{6} x\right )} e\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.53, size = 399, normalized size = 1.76 \begin {gather*} \frac {b\,d^3\,e\,\ln \left (e+f\,x\right )}{{\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}^2}-\frac {a\,f}{2\,{\left (e+f\,x\right )}^2\,\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}-\frac {b\,d\,e}{2\,{\left (e+f\,x\right )}^2\,\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}-\frac {a\,c^2\,f}{2\,{\left (e+f\,x\right )}^2\,\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}-\frac {b\,\mathrm {atan}\left (c+d\,x\right )}{2\,f\,{\left (e+f\,x\right )}^2}-\frac {b\,c\,d^2\,f\,\ln \left (e+f\,x\right )}{{\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}^2}+\frac {a\,c\,d\,e}{{\left (e+f\,x\right )}^2\,\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}-\frac {b\,d\,f\,x}{2\,{\left (e+f\,x\right )}^2\,\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}-\frac {a\,d^2\,e^2}{2\,f\,{\left (e+f\,x\right )}^2\,\left (c^2\,f^2-2\,c\,d\,e\,f+d^2\,e^2+f^2\right )}-\frac {b\,d^2\,\ln \left (c+d\,x-\mathrm {i}\right )\,1{}\mathrm {i}}{4\,f\,{\left (d\,e-c\,f+f\,1{}\mathrm {i}\right )}^2}+\frac {b\,d^2\,\ln \left (c+d\,x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4\,f\,{\left (c\,f-d\,e+f\,1{}\mathrm {i}\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________